package com.wwwarehouse.usercenter.bean.business_relationship;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;
import java.util.List;

/**
 * Created by xiaoke.ni on 2017/10/27.
 */

public class BRCustomerFileCheckBean implements Parcelable,Serializable{

    /**
     * businessList : [{"buId":75574,"relationUkid":21440,"salesMans":[{"salesManId":46750,"salesManName":"测试内容95v4"}],"tags":[{"tagId":52047,"tagName":"测试内容5613"}],"viewBuId":21612,"viewBuName":"测试内容c650"}]
     * page : 86603
     * screen : [{"buId":34157,"buName":"测试内容254n"}]
     * size : 28515
     * total : 13808
     */

    private int page;
    private int size;
    private int total;
    private List<BusinessListBean> businessList;
    private List<ScreenBean> screen;

    public BRCustomerFileCheckBean() {

    }
    protected BRCustomerFileCheckBean(Parcel in) {
        page = in.readInt();
        size = in.readInt();
        total = in.readInt();
        businessList = in.createTypedArrayList(BusinessListBean.CREATOR);
    }

    public static final Creator<BRCustomerFileCheckBean> CREATOR = new Creator<BRCustomerFileCheckBean>() {
        @Override
        public BRCustomerFileCheckBean createFromParcel(Parcel in) {
            return new BRCustomerFileCheckBean(in);
        }

        @Override
        public BRCustomerFileCheckBean[] newArray(int size) {
            return new BRCustomerFileCheckBean[size];
        }
    };

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public List<BusinessListBean> getBusinessList() {
        return businessList;
    }

    public void setBusinessList(List<BusinessListBean> businessList) {
        this.businessList = businessList;
    }

    public List<ScreenBean> getScreen() {
        return screen;
    }

    public void setScreen(List<ScreenBean> screen) {
        this.screen = screen;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(page);
        dest.writeInt(size);
        dest.writeInt(total);
        dest.writeTypedList(businessList);
    }

    public static class BusinessListBean implements Parcelable,Serializable{
        /**
         * buId : 75574
         * relationUkid : 21440
         * salesMans : [{"salesManId":46750,"salesManName":"测试内容95v4"}]
         * tags : [{"tagId":52047,"tagName":"测试内容5613"}]
         * viewBuId : 21612
         * viewBuName : 测试内容c650
         */

        private String buId;
        private String relationUkid;
        private String viewBuId;
        private String viewBuName;
        private List<SalesMansBean> salesMans;
        private List<TagsBean> tags;

        public BusinessListBean(){}

        protected BusinessListBean(Parcel in) {
            buId = in.readString();
            relationUkid = in.readString();
            viewBuId = in.readString();
            viewBuName = in.readString();
        }

        public static final Creator<BusinessListBean> CREATOR = new Creator<BusinessListBean>() {
            @Override
            public BusinessListBean createFromParcel(Parcel in) {
                return new BusinessListBean(in);
            }

            @Override
            public BusinessListBean[] newArray(int size) {
                return new BusinessListBean[size];
            }
        };

        public String getBuId() {
            return buId;
        }

        public void setBuId(String buId) {
            this.buId = buId;
        }

        public String getRelationUkid() {
            return relationUkid;
        }

        public void setRelationUkid(String relationUkid) {
            this.relationUkid = relationUkid;
        }

        public String getViewBuId() {
            return viewBuId;
        }

        public void setViewBuId(String viewBuId) {
            this.viewBuId = viewBuId;
        }

        public String getViewBuName() {
            return viewBuName;
        }

        public void setViewBuName(String viewBuName) {
            this.viewBuName = viewBuName;
        }

        public List<SalesMansBean> getSalesMans() {
            return salesMans;
        }

        public void setSalesMans(List<SalesMansBean> salesMans) {
            this.salesMans = salesMans;
        }

        public List<TagsBean> getTags() {
            return tags;
        }

        public void setTags(List<TagsBean> tags) {
            this.tags = tags;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(buId);
            dest.writeString(relationUkid);
            dest.writeString(viewBuId);
            dest.writeString(viewBuName);
        }

        public static class SalesMansBean implements Serializable {
            /**
             * salesManId : 46750
             * salesManName : 测试内容95v4
             */

            private String salesManId;
            private String salesManName;

            public String getSalesManId() {
                return salesManId;
            }

            public void setSalesManId(String salesManId) {
                this.salesManId = salesManId;
            }

            public String getSalesManName() {
                return salesManName;
            }

            public void setSalesManName(String salesManName) {
                this.salesManName = salesManName;
            }
        }

        public static class TagsBean implements Serializable {
            /**
             * tagId : 52047
             * tagName : 测试内容5613
             */

            private String tagId;
            private String tagName;

            public String getTagId() {
                return tagId;
            }

            public void setTagId(String tagId) {
                this.tagId = tagId;
            }

            public String getTagName() {
                return tagName;
            }

            public void setTagName(String tagName) {
                this.tagName = tagName;
            }
        }
    }

    public static class ScreenBean implements Serializable{
        /**
         * buId : 34157
         * buName : 测试内容254n
         */

        private String buId;
        private String buName;
        private boolean isSelected;

        public boolean isSelected() {
            return isSelected;
        }

        public void setSelected(boolean selected) {
            isSelected = selected;
        }

        public String getBuId() {
            return buId;
        }

        public void setBuId(String buId) {
            this.buId = buId;
        }

        public String getBuName() {
            return buName;
        }

        public void setBuName(String buName) {
            this.buName = buName;
        }
    }
}
